Reprinted: http://www.phppan.com/2010/05/mysql-delimit/
Delimiter problems encountered during the first MySQL storage write processI wrote the Oracle stored procedure a long time ago. Yesterday, due to some special reasons, I had to write some
Why to use delimiters: because PHP is a web programming language, in the programming process will inevitably encounter with Echo to output a large segment of HTML and JavaScript script, if the traditional output method-by string output, There must
If you use the traditional output method--by string output--there must be a large number of escape characters to escape the special characters in the string, such as quotes, so that there is no syntax error. If it's one or two, you can tolerate it,
The end identifier must start at the first column of the row. Similarly, identifiers must follow the naming conventions of any other tag in PHP: They can only contain alphanumeric underscores, and must begin with an underscore or non-numeric
/************************************************************** Name: Fn_split_text feature Description: [Split text into temporary table by delimiter] parameter introduction: [@ Text] to be split back: Table: Subcolstr: Split String Special
The end identifier must start at the first column of the row. Similarly, identifiers must follow the naming conventions of any other tag in PHP: They can only contain alphanumeric underscores, and must begin with an underscore or non-numeric
Double quote resolution variable, single quote non-parsed variable, delimiter parse variableDirect output single quotation marks in double quotes, double quotes directly in single quotation marks,Single quote output single quotes need to be escaped,
Data file: TestData.txtContent:111 222 444 555Ideas:Getline () reads the first row of records in the TestData.txt into a string, searches for the nth delimiter to locate, determines the nth field length, uses substr, intercepts
PHP is a web programming language, in the programming process will inevitably encounter with Echo to output a large segment of HTML and JavaScript script, if the traditional output method-by string output,There must be a large number of escapes to
PHP is a web programming language, in the programming process will inevitably encounter the use of echo to output a large segment of HTML and JavaScript script, if the traditional output method-by the string output, there must be a large number of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.